package edu.scut.course_management.po;

/**
 * 持久化对象， 对应库表：teaches
 */
public class Teaches {
    private String teacherId;
    private Integer courseId;
    private Integer periodId;
    private String year;
    private String term;
    private String buildingId;
    private String roomNumber;
    private String identifier;

    

    public String getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(String teacherId) {
        this.teacherId = teacherId;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public Integer getPeriodId() {
        return periodId;
    }

    public void setPeriodId(Integer periodId) {
        this.periodId = periodId;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getTerm() {
        return term;
    }

    public void setTerm(String term) {
        this.term = term;
    }

    public String getBuildingId() {
        return buildingId;
    }

    public void setBuildingId(String buildingId) {
        this.buildingId = buildingId;
    }

    public String getRoomNumber() {
        return roomNumber;
    }

    public void setRoomNumber(String roomNumber) {
        this.roomNumber = roomNumber;
    }

    public String getIdentifier() {
        return identifier;
    }

    public void setIdentifier(String identifier) {
        this.identifier = identifier;
    }

    @Override
    public String toString() {
        return "Teaches {" + 
               "buildingId=" + buildingId + 
               ", courseId=" + courseId + 
               ", identifier=" + identifier +
               ", periodId=" + periodId + 
               ", roomNumber=" + roomNumber + 
               ", teacherId=" + teacherId + 
               ", term=" + term + 
               ", year=" + year + 
               "}";
    }
    public Teaches(){

    }

    public Teaches(String teacherId, Section section, String identifier) {
        this.teacherId = teacherId;
        this.courseId = section.getCourseId();
        this.periodId = section.getPeriodId();
        this.year = section.getYear();
        this.term = section.getTerm();
        this.buildingId = section.getBuildingId();
        this.roomNumber = section.getRoomNumber();
        this.identifier = identifier;
    }

    public Section getSection(){
        Section section = new Section(this.periodId, this.year, this.term, this.courseId, this.buildingId, this.roomNumber);
        return section;
    }


    
}